//
//  indexCollectionViewCell.m
//  时光电影项目
//
//  Created by 墨狂之逸才 on 15/7/25.
//  Copyright (c) 2015年 墨狂之逸才. All rights reserved.
//

#import "indexCollectionViewCell.h"
#import "UIViewExt.h"
#import "UIImageView+WebCache.h"
@implementation indexCollectionViewCell


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        
        [self _creatSubview];
    }
    
    return self;
}

#pragma mark - 创建海报页面里的内容，子视图
- (void)_creatSubview
{
    
    
    _imageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, self.width, self.height)];
    

    
    [self.contentView addSubview:_imageView];
    
    
    
    
    
}


- (void)setModal:(MovieModal *)modal
{
    
    _modal = modal;
    
    [self setNeedsLayout];
}


//获取图片
- (void)layoutSubviews
{
    
    NSString *str = [_modal.images objectForKey:@"medium"];
    
    [_imageView sd_setImageWithURL:[NSURL URLWithString:str]];
    
    
}




@end
